Closed Bug 1576507 Opened 6 years ago Closed 6 years ago

provide `FirstStartup` service for post-install tasks, starting with Normandy

Categories

(Toolkit :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: rhelmer, Assigned: rhelmer)

References

(Blocks 2 open bugs)

Details

Attachments

(5 files, 2 obsolete files)

Currently there isn't a great way to run post-install tasks after Stub Installer has finished its work, but before the first Firefox window is shown. An example of the sorts of tasks we'd like to allow are:

  • performance tuning
  • fetching critical data (hotfixes, experiments) and acting on it

After discussion with folks cc'd on this bug, we came up with the idea of having the Windows Stub Installer[1] call Firefox with a specific command-line flag (firefox --first-startup) which will run some work synchronously and block Firefox from showing the first window until either the work is done, or a timeout is reached.

The stub installer shows a progress bar until the first Firefox window appears, which should give a user experience of the first Firefox startup feeling very fast, and not require deferring work until after startup which makes the UI less responsive.

1 - other platforms are out-of-scope for now, because macOS uses a plain DMG and no installer, and Linux distributions tend to control the install process. This is something we can make available to both platforms without additional work, though.

FirstStartup provides an optional mechanism to run synchronous services
before the UI appears. This is intended to be called as a post-install
action from an installer, such as the Windows Stub Installer, to allow
for downloading critical data and performance tuning before the first
run of a new Firefox install.

Attachment #9088012 - Attachment is obsolete: true

Small modification, collect telemetry for actual FirstRun status codes vs. just timeout bool.

Attachment #9088631 - Attachment is obsolete: true
Attachment #9088631 - Flags: data-review?(chutten)
Attachment #9088631 - Flags: data-review?(chutten)
Attachment #9088631 - Flags: data-review?(chutten)
Comment on attachment 9088821 [details] Data review for FirstStartup (`firefox --first-startup`) post-install service DATA COLLECTION REVIEW RESPONSE: Is there or will there be documentation that describes the schema for the ultimate data set available publicly, complete and accurate? Yes. This collection is Telemetry so is documented in its definitions file [Scalars.yaml](https://hg.mozilla.org/mozilla-central/file/tip/toolkit/components/telemetry/Scalars.yaml) and the [Probe Dictionary](https://telemetry.mozilla.org/probe-dictionary/). Is there a control mechanism that allows the user to turn the data collection on and off? Yes. This collection is Telemetry so can be controlled through Firefox's Preferences. If the request is for permanent data collection, is there someone who will monitor the data over time? No. This collection will expire in Firefox 75. Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under? Category 1, Technical. Is the data collection request for default-on or default-off? Default on for all channels. Does the instrumentation include the addition of any new identifiers? No. Is the data collection covered by the existing Firefox privacy notice? Yes. Does there need to be a check-in in the future to determine whether to renew the data? Yes. :rhelmer is responsible for renewing or removing the collection before it expires in Firefox 75. --- Result: datareview+
Attachment #9088821 - Flags: data-review+

Depends on D43366

Pushed by rhelmer@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2d621070f778 add new FirstStartup service and --first-startup post-install flag. r=mconley https://hg.mozilla.org/integration/autoland/rev/f16714d49101 skip ClientEnvironment entries unavailable on first run r=mythmon https://hg.mozilla.org/integration/autoland/rev/2238ba5cec98 add Normandy to FirstStartup service. r=mythmon https://hg.mozilla.org/integration/autoland/rev/efca0164a762 document FirstStartup module r=mythmon

(In reply to Arthur Iakab [arthur_iakab] from comment #10)

Backed out 4 changesets (bug 1576507) for causing xpcshell failures on test_firstStartup.js

Backout revision https://hg.mozilla.org/integration/autoland/rev/2da8982d97aa34a90b0bd871dc32ac8aa65e40a7

Failed push https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=efca0164a7621c926a4661314d2120c67754ed0d&searchStr=tv

Log failures https://treeherder.mozilla.org/logviewer.html#?job_id=264358493&repo=autoland
https://treeherder.mozilla.org/logviewer.html#?job_id=264360361&repo=autoland

Robert can you please take a look?

The way this test and feature are written currently, FirstStartup will time out if Normandy is not enabled (such as on Android).

Since we intend to extend FirstStartup to support other tasks, I think the least brittle way to deal with this is to have an UNSUPPORTED state, which will be used if Normandy is not enabled.

As we add other tasks besides Normandy to FirstStartup we can change this, but for now it'll also give us a useful signal if this --first-startup accidentally gets used somewhere Normandy isn't supported.

Flags: needinfo?(rhelmer)
Pushed by rhelmer@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c547b758be35 add new FirstStartup service and --first-startup post-install flag. r=mconley https://hg.mozilla.org/integration/autoland/rev/c0422b67e5d0 skip ClientEnvironment entries unavailable on first run r=mythmon https://hg.mozilla.org/integration/autoland/rev/797a54d2af1d add Normandy to FirstStartup service. r=mythmon https://hg.mozilla.org/integration/autoland/rev/7afcfc71024f document FirstStartup module r=mythmon
Blocks: 1564149
Blocks: 1571777
Regressions: 1643079
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: